import {
	$get,
	$post
} from '@/puigins/request.js';

export function getMe() {
	return new Promise((resolve, reject) => {
		$get('/setting/getMe').then(({ data }) => {
			resolve(data)
		}).catch(reject)
	})
}
export function getSetting() {
	return new Promise((resolve, reject) => {
		$get('/setting/getSetting').then(({ data }) => {
			resolve(data)
		}).catch(reject)
	})
}
export function saveSetting(setting) {
	return new Promise((resolve, reject) => {
		$post('/setting/saveSetting', setting).then(({ data }) => {
			resolve(data)
		}).catch(reject)
	})
}
export function getMyUv(type) {
	return new Promise((resolve, reject) => {
		$get('/setting/getMyUv', {
			type
		}).then(({ data }) => {
			resolve(data)
		}).catch(reject)
	})
}